/**
 * 
 * Code from http://www.codeproject.com/Articles/53366/Binary-Trees-in-Java
 * @author  Wang Jeon, modified by noodle
 */
public class BNode<T> {

    public BNode<T> leftBNode,  rightBNode, sibling; // the nodes
    public T value; //the AnyClass objext

    public BNode(T anyClass ) {//constructor
        this.value= anyClass;
        this.leftBNode = null;
        this.rightBNode = null;
    }

    public String toString(){
    	String sib = (sibling == null) ? " none " : sibling.toString();
    	return value + " sib " + sib;
    }
    
    public void show() {
        //calls the show method of the AnyClass
        System.out.print(value);
    }
}